package com.epfresh.api.entity;

public class StatusEntity {
//     "merchantId" : 531,
//     "storeId" : 274,
    private boolean success;
    private String msg;
    private String result;
    private String merchantId;
    private String storeId;

    Double restPromotionQuantity;
    Double restSeckillQuantity;


    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Double getRestPromotionQuantity() {
        return restPromotionQuantity;
    }

    public void setRestPromotionQuantity(Double restPromotionQuantity) {
        this.restPromotionQuantity = restPromotionQuantity;
    }

    public Double getRestSeckillQuantity() {
        return restSeckillQuantity;
    }

    public void setRestSeckillQuantity(Double restSeckillQuantity) {
        this.restSeckillQuantity = restSeckillQuantity;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public boolean isPromotionOrSeckillFail(){
        if (restPromotionQuantity != null && restPromotionQuantity > 0){
            return true;
        }
        if (restSeckillQuantity != null && restSeckillQuantity > 0){
            return true;
        }
        return false;
    }
    public boolean isSeckillFail(){
        if (restSeckillQuantity != null && restSeckillQuantity > 0){
            return true;
        }
        return false;
    }
    public boolean isPromotionFail(){
        if (restPromotionQuantity != null && restPromotionQuantity > 0){
            return true;
        }

        return false;
    }
}
